package com.cie2.janji.pages.admin;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Request;
import org.apache.tapestry5.services.Session;

/**
 *	This page is based on the portion of Tapestry's default ExceptionReport page that
 *	handles the session.
 */

public class DisplaySessionContent {



		@Inject
		@Property
		private Request _request;

		@Property
		private String _attributeName;

		public boolean getHasSession() {
			return _request.getSession(false) != null;
		}

		public Session getSession() {
			return _request.getSession(false);
		}

		public Object getAttributeValue() {
			return getSession().getAttribute(_attributeName);
		}

	}
